//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Copyright 2007 CORE Solutions Limited
// All rights reserved.
// PROPRIETARY AND CONFIDENTIAL INFORMATION.
// Use is subject to license terms.
//
// FUNCTION ID      :   COUNTRY
// AUTHOR           :   Craig Chun
// DATE CREATE      :   2007/07/12
// DESCRIPTION      :   a ROW file for the function, COUNTRY
//                  :
//                  :
//                  :
//
// MODIFICATION HISTORY:
// DATE         AUTHOR          VERSION NO.         COMMENT
// -----------  --------------  ------------------  -------------------
// 2007/07/12   Craig Chun      1.0                 source is generated.
//
//
//
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

package com.erp.app.setup.country.web;

import java.util.Iterator;

import com.erp.framework.controller.form.MultiRowTemplate;
import com.erp.framework.util.CommonUtil;
import com.erp.framework.types.*;
import com.erp.app.common.ProjectConstants;
import com.erp.app.setup.codeSetup.pk.CodeHdrPk;
import com.erp.app.setup.country.pk.*;

/**
* <p>A <strong>Row</strong> is a JavaBean which provides property
* getter and setter methods for all of the bean properties, and implements
* <code>Serializable</code>, as required by the JavaBean specification
* The main purpose for this bean is to store the detail childs.
*
* @author          Craig Chun
* @version 1.0     2007/07/12
* @since           FrameWork 1.0
*
*/
public class CountryPortRow extends MultiRowTemplate {

	//DB Table Name: T_COUNTRY_PORT

	//PK Attributes
	private String companyCode = "";                                                                   //DB Column Name: COMPANY_CODE
	private String countryCode = "";                                                                   //DB Column Name: COUNTRY_CODE
	private String portCode = "";                                                                      //DB Column Name: PORT_CODE

	//Other Attributes
	private String portPortName = "";                                                                  //DB Column Name: PORT_NAME
	private String portIsoPortCode = "";                                                               //DB Column Name: ISO_PORT_CODE
	private String portPortType = "";                                                                  //DB Column Name: PORT_TYPE
	private String portPortAbbr = "";                                                                  //DB Column Name: PORT_ABBR
	private String portStatus = "";                                                                    //DB Column Name: STATUS
	private String portSeq ="";		                                                                   //DB Column Name: SEQ
	private String createUser = "";                                                                    //DB Column Name: CREATE_USER
	private String createDate = "";                                                                    //DB Column Name: CREATE_DATE
	private String updateUser = "";                                                                    //DB Column Name: UPDATE_USER
	private String updateDate = "";                                                                    //DB Column Name: UPDATE_DATE

	/**
	* Converts to a string representing the data in this object.
	* A new <code>String</code> object is allocated and initialized to
	* contain the character sequence currently represented by this
	* object. This <code>String</code> is then returned. Subsequent
	* changes to this object do not affect the contents of the
	* <code>String</code>.
	*
	* @return     a string representation of the object.
	* @see        java.lang.Object#toString()
	* @author     Craig Chun
	* @since      Framework 1.0
	*/
	public String toString() {
		String pkStr = "PK: {companyCode = " + this.companyCode
			+ "\n, countryCode = " + this.countryCode
			+ "\n, portCode = " + this.portCode + "}\n";
		String colStr = "COL: {portPortName = " + this.portPortName
			+ "\n, portIsoPortCode = " + this.portIsoPortCode
			+ "\n, portPortType = " + this.portPortType
			+ "\n, portPortAbbr = " + this.portPortAbbr
			+ "\n, portStatus = " + this.portStatus
			+ "\n, createUser = " + this.createUser
			+ "\n, createDate = " + this.createDate
			+ "\n, updateUser = " + this.updateUser
			+ "\n, updateDate = " + this.updateDate + "}\n";
		return "CountryPortRow.toString() is:\n" + pkStr + colStr;
	}

	////////////////////////////////////////////////////////////////////////////////
	//Generated Accessors (get/set methods)
	////////////////////////////////////////////////////////////////////////////////

	public String getCompanyCode() {
		return this.companyCode;
	}

	public String getCountryCode() {
		return this.countryCode;
	}

	public String getPortCode() {
		return this.portCode;
	}

	public String getPortPortName() {
		return this.portPortName;
	}

	public String getPortIsoPortCode() {
		return this.portIsoPortCode;
	}

	public String getPortPortType() {
		return this.portPortType;
	}

	public String getPortPortAbbr() {
		return this.portPortAbbr;
	}

	public String getPortStatus() {
		return this.portStatus;
	}

	public String getCreateUser() {
		return this.createUser;
	}

	public String getCreateDate() {
		return this.createDate;
	}

	public String getUpdateUser() {
		return this.updateUser;
	}

	public String getUpdateDate() {
		return this.updateDate;
	}

	public void setCompanyCode(String companyCode) {
		this.companyCode = CommonUtil.toCode(companyCode);
	}

	public void setCountryCode(String countryCode) {
		this.countryCode = CommonUtil.toCode(countryCode);
	}

	public void setPortCode(String portCode) {
		this.portCode = CommonUtil.toCode(portCode);
	}

	public void setPortPortName(String portPortName) {
		this.portPortName = CommonUtil.trim(portPortName);
	}

	public void setPortIsoPortCode(String portIsoPortCode) {
		this.portIsoPortCode = CommonUtil.trim(portIsoPortCode);
	}

	public void setPortPortType(String portPortType) {
		this.portPortType = CommonUtil.trim(portPortType);
	}

	public void setPortPortAbbr(String portPortAbbr) {
		this.portPortAbbr = CommonUtil.trim(portPortAbbr);
	}

	public void setPortStatus(String portStatus) {
		this.portStatus = CommonUtil.trim(portStatus);
	}

	public void setCreateUser(String createUser) {
		this.createUser = CommonUtil.trim(createUser);
	}

	public void setCreateDate(String createDate) {
		this.createDate = CommonUtil.trim(createDate);
	}

	public void setUpdateUser(String updateUser) {
		this.updateUser = CommonUtil.trim(updateUser);
	}

	public void setUpdateDate(String updateDate) {
		this.updateDate = CommonUtil.trim(updateDate);
	}

	////////////////////////////////////////////////////////////////////////////////
	//Other Accessors (get/set methods)
	////////////////////////////////////////////////////////////////////////////////


	public CountryPortPk getPk() {
		return new CountryPortPk(String.valueOf(this.getCompanyCode()), String.valueOf(this.getCountryCode()), String.valueOf(this.getPortCode()));
	}

	public String getPortSeq() {
		return portSeq;
	}

	public void setPortSeq(String portSeq) {
		this.portSeq = portSeq;
	}

	public Iterator getPortPortTypeValues() {
        return this.getTemplate().getCodeDetailsValues(new CodeHdrPk(this.getCompanyCode(), ProjectConstants.CD_COUNTRY_PORT_TYPE_CODE));
    }

	public Iterator getPortIsoPortCodeValues() {
        return this.getTemplate().getCodeDetailsValues(new CodeHdrPk(this.getCompanyCode(), ProjectConstants.CD_ISO_COUNTRY_CODE));
    }

	public Iterator getPortStatusValues() {
        return this.getTemplate().getCommonStatusValues();
    }
}
